package com.zyd.blog.homeart.service.impl;

import com.zyd.blog.homeart.service.ClassificationService;
import com.zyd.blog.persistence.beans.Classification;
import com.zyd.blog.persistence.mapper.ClassificationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ClassificationServiseImpl implements ClassificationService {
@Autowired
private ClassificationMapper classificationMapper;

    @Override
    public List<Classification> menu(String type) throws Exception {
        List<Classification> menu;
        try {
            menu  = classificationMapper.menu(type);
        } catch (Exception e) {
            throw new Exception("获取菜单失败");
        }
        return menu;
    }
}
